package com.atguigu.medicalsugar.bean;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @Author lzc
 * @Date 2023/5/29 09:51
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
public class TradePatientAgeRangeBean {
    public static final String[] ageRangeDescs = {
        "0-9岁",
        "10-19岁",
        "20-29岁",
        "30-39岁",
        "40-49岁",
        "50-59岁",
        "60-69岁",
        "70-79岁",
        "80-89岁",
        "90-99岁",
        "100岁以上",
    };
    private Long age_range; // 0(0-9), 1(10-19),.... 年龄段
    private String age_range_desc; // 年龄段描述
    
    
    private BigDecimal consultation_amount; //
    private BigDecimal consultation_pay_amount; //
    private BigDecimal prescription_amount; //
    private BigDecimal prescription_pay_amount; //
    
    public void setAge_range(Long age_range) {
        this.age_range = age_range;
        
        this.age_range_desc = ageRangeDescs[Math.toIntExact(age_range)];
        
    }
}
